package com.mgkj.dto.yf;

import com.fasterxml.jackson.annotation.JsonProperty;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Pattern;
import java.io.Serializable;
import java.util.List;

/**
 * @author : ssy
 * @date: 2024-04-01
 * @Description:
 */
@Data
@ApiModel("库存交易Dto")
public class StockTrading implements Serializable {

    @ApiModelProperty(value = "单别",required = true)
    @NotBlank(message = "单别不能为空")
    @JsonProperty("TA001")
    private String TA001;

    @ApiModelProperty(value = "单号",required = true)
    @NotBlank(message = "单号不能为空")
    @JsonProperty("TA002")
    private String TA002;

    @ApiModelProperty(value = "交易日期",required = true)
    @NotBlank(message = "交易日期不能为空")
    @JsonProperty("TA003")
    private String TA003;

    @ApiModelProperty(value = "审核码",required = true)
    @Pattern(regexp = "^[NY]$",message = "审核码只允许输入N|Y")
    @JsonProperty("TA006")
    private String TA006;

    @ApiModelProperty(value = "工厂",required = true)
    @NotBlank(message = "工厂不能为空")
    @JsonProperty("TA008")
    private String TA008;

    @ApiModelProperty(value = "单据性质码",required = true)
    @NotBlank(message = "单据性质码不能为空，11.一般单据、12.调拨单")
    @JsonProperty("TA009")
    private String TA009;

    @ApiModelProperty(value = "公司",required = true)
    @NotBlank(message = "公司不能为空")
    private String company;

    private List<StockTradingBody> stockTradingBodies;
}